COMMENT TO
EXAMPLE. |
|
database
employee; //There is now an employee variable that has modifiable variables
inside it. |
|
The struct database declares
that database has three variables in it, age, id_number, and salary. You can use database like a variable type like int. You can create an employee with the database type as I did above. Then, to modify it you call everything with the 'employee.' in front of it. You can also return structures from functions by defining their return type as a structure type. Example: struct database fn(); |